package main

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func main() {
	//实例化一个gin框架
	r := gin.Default()
	r.GET("/ping", func(c *gin.Context) {
		//H->map[string]string
		c.JSON(http.StatusOK, gin.H{
			"message": "pong",
		})

	})
	r.Run() //默认监听:0.0.0.0:8080
}
